{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "89fce7cc",
   "metadata": {},
   "source": [
    "---\n",
    "* 2023-10-16\n",
    "* 课程：Python语言\n",
    "* week06\n",
    "---"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7f0ac015",
   "metadata": {},
   "source": [
    "# 本周内容\n",
    "\n",
    "## 课本实践\n",
    "\n",
    "> 1. 项目一\n",
    "```\n",
    "from datetime import datetime\n",
    "\n",
    "odds = [  1, 3,  5,  7,  9, 11,13,15,17,19\n",
    "             21,23,25,27,29,31,33,35,37,39\n",
    "             41,43,45,47,49,51,53,55,57,59]\n",
    "\n",
    "right_this_minute = datetime.today().minute\n",
    "\n",
    "if right_this_minute in odds:\n",
    "    print(\"This minute seems a little odd.\")\n",
    "else:\n",
    "    print(\"Not an odd minute.\")\n",
    "```\n",
    "\n",
    "> 2. 项目二（补random模块）\n",
    "```\n",
    "from datetime import datetime\n",
    "\n",
    "import random\n",
    "import time\n",
    "\n",
    "odds = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59]\n",
    "\n",
    "for i in range(5):\n",
    "    right_this_second = datetime.today().second\n",
    "    if right_this_second in odds:\n",
    "        print(\"This second seems a little odd.\")\n",
    "    else:\n",
    "        print(\"Not an odd second.\")\n",
    "    wait_time = random.randint(1,5)\n",
    "    time.sleep(wait_time)\n",
    "```\n",
    "\n",
    "> 3. 项目三\n",
    "```\n",
    "word = \"bottles\"\n",
    "for beer_num in range(99, 0, -1):\n",
    "    print(beer_num, word, \"of beer on the wall.\")\n",
    "    print(beer_num, word, \"of beer.\")\n",
    "    print(\"Take one down.\")\n",
    "    print(\"Pass it around.\")\n",
    "    if beer_num == 1:\n",
    "        print(\"No more bottles of beer on the wall.\")\n",
    "    else:\n",
    "        new_num = beer_num - 1\n",
    "        if new_num == 1:\n",
    "            word = \"bottle\"\n",
    "        print(new_num, word, \"of beer on the wall.\")\n",
    "    print()\n",
    "```\n",
    "\n",
    "## while 循环\n",
    "\n",
    "> 1. while循环认知\n",
    "> 2. while True\n",
    "> 3. while 与 for循环区别\n",
    "> 4. while 循环实践（猜数字）\n",
    "\n",
    "## 认知数据结构（4种）\n",
    "\n",
    "> 1. 列表\n",
    "> 2. 元组\n",
    "> 3. 集合\n",
    "> 4. 字典\n",
    "> 5. \"一切皆是对象\"\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.13"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
